package com.xiaoq.feature.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.xiaoq.feature.entity.CommentEntity;
import com.xiaoq.feature.repository.ICommentRepository;
import com.xiaoq.feature.service.ICommentService;
import com.xiaoq.vo.PagingVo;

@Component
public class CommentServiceImpl implements ICommentService {
	
	@Autowired
	private ICommentRepository commentRepository;

	@Override
	public List<CommentEntity> findCommentList(String shopId, String tag, PagingVo pvo) {
		
		return commentRepository.findCommentList(shopId, tag, pvo);
	}

	@Override
	public boolean addComment(CommentEntity comment) {
		return commentRepository.addComment(comment);
	}

	@Override
	public long findCommentNums(String shopId) {
		return commentRepository.findCommentNums(shopId);
	}

}
